<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        $this->load->library('session');
    }
    
}

class MY_FrontController extends MY_Controller {
    
    public function __construct()
    {
        parent::__construct();
    }

}

class MY_BackController extends MY_Controller {
    
    public function __construct()
    {
        parent::__construct();
    }
    
    protected function admin_priv($priv_str)
    {
        if ($this->session->userdata('action_list') == 'all')
        {
            return true;
        }

        if (strpos($this->session->userdata('action_list'), $priv_str) === false)
        {
            show_error('没有权限');
            return false;
        }
        else
        {
            return true;
        }
    }
    
}